<template>
	<view class="medui">
		<view class="title">队伍名称：</view>
		<view class="name">{{list.text}}{{list.test}}</view>
		<view class="title">队伍成员：</view>
		<view class="list">
			<view class="person flex" v-for="(item,index) in liste">
				<view class="person-left ">
					{{index+1}}
					<image :src="item.img" class="person-img" mode="widthFix"> </image>
					<image :src="item.win" class="win" mode="widthFix"></image>
					<p class="person-people">{{item.name}}</p>
				</view>
				<view class="person-right">
					{{item.millon}}
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import {
		mapState,
		mapMutations
	} from 'vuex';
	export default {
		data() {
			return {
				list: {
					text: '',
					test: "",
				},
				liste: [{
					img: "../../static/person1.jpg",
					win: "../../static/win.png",
					name: "小史管住嘴",
					millon: "2500.00里"
				}, {
					img: "../../static/person2.jpg",
					win: "../../static/win2.png",
					name: "捷克",
					millon: "2500.00里"
				}, {
					img: "../../static/person3.jpg",
					win: "../../static/win3.png",
					name: "落叶归根",
					millon: "2500.00里"
				}, {
					img: "../../static/person4.jpg",
					win: "",
					name: "亦然",
					millon: "2500.00里"
				}]
			}
		},
		onLoad() {
			this.vv()
		},
		methods: {
			vv() {
				//查询
				this.$api.chadui().then((res) => {
					this.list = res.data[0]
					console.log(this.list);
					this.$store.commit('Minus', this.list)
				})
			},

		}
	}
</script>

<style scoped>
	* {
		padding: 0;
		margin: 0;
	}

	.medui {
		padding: 40rpx;
	}

	.title {
		font-size: 38rpx
	}

	.name {
		border: #ccc 1px solid;
		border-radius: 20rpx;
		box-shadow: #ccc 2rpx 2rpx 5rpx 4rpx;
		padding: 20rpx 40rpx;
		margin: 40rpx 0;
		background-color: #fff;
	}

	.person {
		background-color: #fff;
		border-radius: 5px;
		padding: 20rpx 30rpx;
		margin-top: 20rpx;
		position: relative;
		box-shadow: #ccc 2rpx 2rpx 5rpx 4rpx;
	}

	.person-img {
		width: 80rpx;
		height: 80rpx;
		border-radius: 25px;
		vertical-align: middle;
		margin: 0 20rpx;
	}

	.person-people {
		display: inline-block;
	}

	.person-right {
		color: red;
		font-size: 12px;
		line-height: 80rpx;
	}

	.flex {
		display: flex;
		justify-content: space-between;
	}

	.win {
		top: 0;
		width: 60rpx;
		position: absolute;
		left: 50rpx;
	}
</style>
